<template>
  <div v-if="resultEvaluation" class="resultSheet">
    <div class="panel result">
      <div class="panel-title">评估结果</div>
      <div class="panel-content">
        <div class="tabs-result-assessment">
          <el-table
            :data="resultEvaluation.setResultInfoDTOList"
            border
            highlight-current-row
            style="width: 80%">
            <el-table-column
              prop="setName"
              label="评估项目"
            >
            </el-table-column>
            <el-table-column
              prop="resultValue"
              label="评估得分"
            >
            </el-table-column>
            <el-table-column
              prop="resultName"
              label="评估等级"
            >
            </el-table-column>
          </el-table>
        </div>
      </div>
      <div class="assessmentMark">
        <reference :reference="resultEvaluation.sheetResultDTOList" :results = "results" ></reference>
      </div>
      <div class="assessmentInput">
        <inputs v-if="resultHealthy" :setresult="resultEvaluation.assessmentResultDTO" :results="resultHealthy" :member="member"
                :currentTasId="currentTasId" :careLevelOptions="resultEvaluation.serviceCareLevels"
                :optionsDisabled = "optionsDisabled"
                @goto="goto"></inputs>
        <inputs v-if="!resultHealthy" :setresult="resultEvaluation.assessmentResultDTO" :results="results" :member="member"
                :currentTasId="currentTasId" :careLevelOptions="resultEvaluation.serviceCareLevels"
                :optionsDisabled = "optionsDisabled"
                @goto="goto"></inputs>
      </div>
    </div>
    <div>{{$data.result}}</div>
  </div>
</template>

<script>
  import reference from "./reference";
  import inputs from "./inputs";
  export default {
    props: ["currentTasId", "member", "options", "type", "other", "resultEvaluation","optionsDisabled","resultHealthy","itemResultVOList"],
    components: {reference, inputs},
    data(){
      return {
        tableData: [],
        setresult: {
          "auditTime": "",
          "auditUser": "",
          "comment": "",
          "rId": 0,
          "resultValue": 0,
          "careLevel": "",
          "resultName":""
        },
        results: {
          "assessId": 0,
          "auditTime": "",
          "auditUser": "",
          "comment": "",
          "itemResultVOList": [],
          "rId": '',
          "resultValue": 0,
          "setId": 0,
          "sheetId": 0,
          "resultName":""
        }
      }
    },
    methods: {
      init(){
      },
      isResult(){
        this.isResultShow = true;
      },
      goto(taskKey){
        this.$emit("goto", taskKey);
      }
    },
    mounted: function () {
      this.init();
    }
  }
</script>

<style>

  .resultSheet {
    padding-left: 15px;
    font-size: 14px !important;
  }

  .resultSheet .result .panel-title {
    margin-top: 0px !important;
  }

  .resultSheet .panel-title {
    width: auto;
  }

  .resultSheet .result .tabs tr {
    background-color: #eef1f6;
  }

  .resultSheet .plan-meal .care {
    margin-top: 15px;
    margin-bottom: 20px;
    width: 350px;
  }

  .resultSheet .panel .fee .synchronize {
    display: inline-block;
    width: 300px;
    font-size: 12px;
  }

  .resultSheet .panel .fee .synchronize label {
    margin-bottom: 7px;
  }

  .resultSheet .assessmentInput {
    margin-top: 30px;
    padding-left: 15px;
  }

  .resultSheet .assessmentInput label {
    margin-right: 7px;
  }

  .resultSheet .assessmentInput .el-row {
    margin-bottom: 10px;
  }

</style>
